<template>
  <div class="user-info-box">
    <div class="user-top"></div>
    <div class="user-head">
      <img src="" />
      <span>用户名</span>
    </div>
    <div class="user-info">
      <div>
        <div class="title">关注</div>
        <div class="count" @click="goFansPage(1)">1</div>
      </div>
      <div>
        <div class="title">粉丝</div>
        <div class="count" @click="goFansPage(2)">1</div>
      </div>
      <div>
        <div class="title">动态</div>
        <div class="count">1</div>
      </div>
    </div>
  </div>
</template>
<script setup>
import { useRoute, useRouter } from "vue-router";
const router = useRouter();
const route = useRoute();
function goFansPage(type) {
  console.log(type, router, route);
  router.push({
    path: "fans",
  });
}
</script>
<style lang="scss" scoped>
.user-info-box {
  .user-top {
    border-radius: 10px 10px 0 0;
    height: 80px;
    background-color: darkmagenta;
  }
  .user-head {
    height: 60px;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    img {
      margin-left: 20px;
      margin-top: -30px;
      width: 60px;
      height: 60px;
      border-radius: 50%;
    }
    span {
      color: #000;
      margin-left: 20px;
    }
  }
  .user-info {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    .title {
      color: darkgray;
      font-size: 12px;
    }
    .count {
      color: #000;
      padding-top: 10px;
    }
  }
}
</style>
